Skip to content

fix(rivetkit): remove drizzle-orm peer dep and add runtime version check#4492

Open
NathanFlurry wants to merge 1 commit into03-23-chore_skill_add_version_check_to_rivetkit_skillfrom
03-23-fix_rivetkit_remove_drizzle-orm_peer_dep_and_add_runtime_version_check
Open

fix(rivetkit): remove drizzle-orm peer dep and add runtime version check#4492
NathanFlurry wants to merge 1 commit into03-23-chore_skill_add_version_check_to_rivetkit_skillfrom
03-23-fix_rivetkit_remove_drizzle-orm_peer_dep_and_add_runtime_version_check

Conversation

@NathanFlurry
Copy link
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link

railway-app bot commented Mar 24, 2026

🚅 Deployed to the rivet-pr-4492 environment in rivet-frontend

Service Status Web Updated (UTC)
kitchen-sink ❌ Build Failed (View Logs) Web Mar 24, 2026 at 11:31 am
website ❌ Build Failed (View Logs) Web Mar 24, 2026 at 3:29 am
frontend-inspector ❌ Build Failed (View Logs) Web Mar 24, 2026 at 3:29 am
frontend-cloud ❌ Build Failed (View Logs) Web Mar 24, 2026 at 3:29 am
mcp-hub ✅ Success (View Logs) Web Mar 24, 2026 at 3:29 am
ladle ❌ Build Failed (View Logs) Web Mar 24, 2026 at 3:29 am

@claude
Copy link

claude bot commented Mar 24, 2026

PR Review: fix(rivetkit): remove drizzle-orm peer dep and add runtime version check\n\nOverall this is a clean, well-scoped change. The runtime version check is a solid approach for optional feature dependencies. A few issues worth addressing.\n\n### Bug: Script exits 0 even when tests fail\n\ntest-drizzle-compat.sh uses set -euo pipefail but captures test failures with if/else, so those failures do not propagate. The script will exit 0 even if every version fails, making it useless in CI.\n\nAdd a final exit code check after the results summary.\n\n### Doc mismatch in CLAUDE.md\n\nThe new doc section says to update SUPPORTED_DRIZZLE_RANGE in mod.ts, but the actual constants are DRIZZLE_MIN and DRIZZLE_MAX. Should read: Update the DEFAULT_VERSIONS array in the script and DRIZZLE_MIN/DRIZZLE_MAX in src/db/drizzle/mod.ts when adding support for new drizzle releases.\n\n### Silent catch in checkDrizzleVersion could confuse future readers\n\nThe catch block silently swallows errors. If drizzle-orm is not installed, the require call will throw, but the real crash happens earlier at the ESM import level anyway. A comment would prevent this from looking like a silent failure bug.\n\n### Minor: Two-part version strings in isSupported\n\nDEFAULT_VERSIONS passes minor-only strings like 0.44 to pnpm add. If those ever reach isSupported, the split produces no patch segment. compareVersions handles this correctly via the ?? 0 fallback, treating it as 0.44.0. Worth a brief comment confirming this is intentional.\n\n### Nit: Script cleanup fallback\n\nThe pnpm install fallback in the cleanup trap (without --frozen-lockfile) could silently update the lockfile if the frozen install fails. Consider logging a warning rather than silently falling back to a mutable install.\n\n---\n\nGood change overall. The lazy check with drizzleVersionChecked, the createRequire pattern for ESM-safe JSON reads, and the backup/restore isolation in the test script are all solid choices.

@NathanFlurry NathanFlurry force-pushed the 03-23-chore_skill_add_version_check_to_rivetkit_skill branch from 5478836 to 1514f08 Compare March 24, 2026 11:30
@NathanFlurry NathanFlurry force-pushed the 03-23-fix_rivetkit_remove_drizzle-orm_peer_dep_and_add_runtime_version_check branch from 86c1c7d to 2f7fec2 Compare March 24, 2026 11:30
@NathanFlurry NathanFlurry marked this pull request as ready for review March 24, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant